const {
	db,
	dbCmd,
	result_success,
	result_error
} = require('../../common/constants')
module.exports = async function(params = {}) {
	let type = params.type
	let agreement = await db.collection('wmzmall-sys-agreement').where({
		type: type
	}).get()
	agreement = agreement.data[0]
	return result_success(agreement)
}